Just copy and paste the following commands in the terminal in your Ubuntu OS.
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
Make sure your OS package index is up-to-date:
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo rosdep init
rosdep update
At home directory, take a look on bashrc
to check out the setup.bash
gedit .bashrc
You should find source /opt/ros/kinetic/setup.bash
at the end of file.
mkdir -p ~/meqdad_ws/src
cd meqdad_ws/
compile the default files
catkin_make
Run ROS master
roscore
Explore the default topics
rostopic list
It is not recommended to make all your ROS projects in one workspace.
One of the best practices is to customize the workspace for your setup.bash
file
gedit .bashrc
source /home/meqdad/meqdad_ws/devel/setup.bash
cd meqdad_ws/src
catkin_create_pkg ros_demo std_msgs rospy roscpp
Default packages (std_msgs rospy roscpp
)
Our created package (ros_demo
)
Compile created package
cd meqdad_ws/
catkin_make